package com.koron.operation.classes.shift.bean.po;

import com.koron.bean.annocation.FillField;
import com.koron.bean.enums.OperationMode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 交接事项(ClassesTip)表实体类
 *
 * @author jzp
 * @since 2021-10-27
 */
@Data
@ApiModel(value = "交接事项", description = "ClassesTip")
public class ClassesTip {

    @FillField
    @ApiModelProperty(value = "唯一id")
    private String id;

    /**
     * 配置id
     */
    @ApiModelProperty("配置id")
    private String configureId;

    /**
     * 交接班记录id
     */
    @ApiModelProperty("交接班记录id")
    private String recordId;

    /**
     * 一级项
     */
    @ApiModelProperty("一级项")
    private String firstLevel;

    /**
     * 二级项
     */
    @ApiModelProperty("二级项")
    private String secondLevel;

    /**
     * 内容
     */
    @ApiModelProperty("内容")
    private String content;

    @ApiModelProperty(value="是否展示 0不展示、1展示")
    private Boolean displayFlag;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Integer sort;

    /**
     * 创建或更新时间
     */
    @FillField(OperationMode.INSERT_UPDATE)
    @ApiModelProperty("创建或更新时间")
    private Date updateTime;

    public Integer noNullSort() {
        if (sort == null) {
            return 0;
        }
        return sort;
    }

    public boolean noDisplayFlag() {
        if (displayFlag == null) {
            return true;
        }
        return displayFlag;
    }
}
